package com.sumainfor.zuul.service.impl;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.zuul.dao.GetterMessageMapper;
import com.sumainfor.zuul.service.GetterMessageService;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * @Author Eddy·Chen
 * @Email 835033913@qq.com
 * @Create 2019-04-17 18:09
 */
@Service
@Transactional(rollbackFor = Exception.class)
@Log4j2
public class GetterMessageServiceImpl implements GetterMessageService {

    @Autowired
    private GetterMessageMapper mapper;

    /**
     * 查询消息
     *
     * @param params
     * @return
     */
    @Override
    public JsonResult getMessage(Map<String, Object> params) {
        return JsonResult.success(mapper.selectMessage(params));
    }

}
